#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
/*int main()
{
	int money = 0;
	int total = 0;
	int empty = 0;
	scanf("%d", &money);
	total += money;
	empty = total;
	while (empty / 2)
	{
		total += empty / 2;
		empty = empty / 2 + empty % 2;
	}
	printf("%d",total);
	return 0;
}
*/

int main()
{
	int  money = 0;
	int total = 0;
	scanf("%d", &money);
	if (money)
	{
		total = money * 2 - 1;
	}
	else
	{
		total = 0;
	}
	printf("%d", total);
	return 0;
}